#!/bin/bash

echo "开始编译java文件--------$1"

javac -cp /home/flag/apache-tomcat-9.0.0.M10/lib/servlet-api.jar:. $1

if [ $? -eq 0 ]
then
echo "编译成功！即将开启tomcat服务器。。。"

/home/flag/apache-tomcat-9.0.0.M10/bin/shutdown.sh
/home/flag/apache-tomcat-9.0.0.M10/bin/startup.sh

echo "即将自动打开浏览器运行。。。"

sleep 3s

xdg-open http://localhost:8080/getMark/getMark.do
else

echo "编译失败！请检查错误！"

fi

